<div id="control_right"  height:100%;>
{? if $username neq "null" ?}
<a href="/soj/php/manager/manager_user_detail.php?name={? $username ?}">返回{? $username ?}用户管理</a> 
{? /if ?}
<a href="/soj/php/manager/manager_topic_detail.php?tno={? $topic_no?}&op=delete&username={? $username ?}" onClick="return confirm('如果删除的话会将所有的回复也删除真的要删除么?')">删除</a>
{? if  $status eq "close" ?}	
关闭		
<a href="/soj/php/manager/manager_topic_detail.php?tno={? $topic_no ?}&op=open&username={? $username ?}" onClick="return confirm('真的开启?')">开启</a></td>				   
{? else ?}
<a href="/soj/php/manager/manager_topic_detail.php?tno={? $topic_no ?}&op=close&username={? $username ?}" onClick="return confirm('真的关闭?')">关闭</a>
 开启
{? /if ?}	  
</td>
 <div id="info">
 
 <div class="topic_title"  style=" font:bold 20px 宋体;padding-top:10px;">{? $title ?}</div>
 
 <div class="topic_info" style="border-top:groove;border-width:1px;color:#00ffff;padding-top:10px;">
		Postd in {? $post_time|date_format:"%A, %B %e, %H:%M:%S, %Y" ?} and 
		viewed {? $view_count ?} times ,by {? $post_username ?}
	</div>
	<div class="topic_content">

	{?* 主题内容不允许为空,为空时为异常情况,但不能因此破坏用户界面 *?}
	{? if $content == '' ?}
		content is empty ?! what`s wrong ... 
	{? else ?}
		{? $content ?}
	{? /if ?}
	
	</div>

	</div>

	<!--replys-->
	<div class="reply_title">{? $reply_count ?} replys</div>
	
	{? if $reply_count > 0 && $replys ?}
	{?* 回复数为0时,不显示该部分 *?}
	
	{? foreach key=key item=item from=$replys ?}
		
		<div class="reply"  style="padding-top:3px;">
	
		{? foreach key=key item=item from=$item ?}

			{? if $key == 'content' ?}
				{? assign var=content value=$item ?}
			{? /if ?}

			{? if $key == 'reply_username' ?}
				{? assign var=reply_username value=$item ?}
			{? /if ?}
	
			{? if $key == 'reply_time' ?}
				{? assign var=reply_time value=$item ?}
			{? /if ?}
             {? if $key == 'reply_no' ?}
				{? assign var=reply_no value=$item ?}
			{? /if ?}

		{? /foreach ?}

			<div class="reply_info" style="border-top:groove;border-width:1px;color:#00ffff;padding-top:5px;">
			Reply on {? $reply_time|date_format:"%A, %B %e, %H:%M:%S, %Y" ?} by {? $reply_username ?}
			</div>
	
			<div class="reply_content">
			{?* 回复内容不允许为空,为空时为异常情况,但不能因此破坏用户界面 *?}
			{? if $content == '' ?}
				content is empty ?! what`s wrong ... 
			{? else ?}
				{? $content ?}
			{? /if ?}
			</div>	
            <div id="delete">
			<a href="/soj/php/manager/manager_delete_reply.php?no={? $reply_no ?}&username={? $username ?}&tno={? $topic_no ?}" onClick="return confirm('真的要删除?')">删除此条回复</a>
			</div>
		</div>

	{? /foreach ?}

	{? /if ?}
 </div>
</div>